package com.zl.quickdoc.framework;

import java.util.List;

import com.github.javaparser.ast.CompilationUnit;
import com.github.javaparser.ast.body.MethodDeclaration;
import com.zl.quickdoc.model.ApiModule;
import com.zl.quickdoc.model.UriAndMethod;

/**
 * 解析java接口
 * 
 * @author zhouliang
 *
 */
public interface IApiFramework {
    /**
     * 判断是否支持接口
     */
    public boolean support(List<CompilationUnit> cus);
    
    /**
     * 判断是否要解析该接口
     */
    public boolean matched(String className);
    
    /**
     * 接口信息转换
     */
    public List<ApiModule> extend(List<ApiModule> apiModules) throws Exception;

    /**
     * 获取接口uri
     */
    public UriAndMethod getUrisAndMethods(CompilationUnit cu, MethodDeclaration md);

    /**
     * 判断是否都返回json
     */
    boolean checkReturnJson(CompilationUnit cu, MethodDeclaration md);
}
